﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace Alogient.Cameleon.Community.Blog.Items
{
    [Serializable]
    [XmlRoot("Comment")]
    [XmlType("Comment")]
    public class CMComment
    {
        internal CMComment()
        {
        }

        /// <summary>
        /// Gets or sets the Parent Article ID
        /// </summary>
        [XmlAttribute]
        public int ArticleID { get; set; }

        /// <summary>
        /// Gets or sets comment Id
        /// </summary>
        [XmlAttribute]
        public int CommentID { get; set; }

        /// <summary>
        /// Gets or sets  the creation date
        /// </summary>
        [XmlAttribute]
        public DateTime CreationDate { get; set; }

        /// <summary>
        /// Gets or sets the last modified date
        /// </summary>
        [XmlAttribute]
        public DateTime LastModified { get; set; }

        /// <summary>
        /// Gets or sets the comment title
        /// </summary>
        [XmlAttribute]
        public string Title { get; set; }

        /// <summary>
        /// Gets or sets the comment text
        /// </summary>
        [XmlAttribute]
        public string Text { get; set; }

        /// <summary>
        /// Gets or sets the Guid of the user that have created the comment
        /// </summary>
        [XmlAttribute]
        public Guid Author { get; set; }

        /// <summary>
        /// Gets or sets the Author first name
        /// </summary>
        [XmlAttribute]
        public string AuthorFirstName { get; set; }

        /// <summary>
        /// Gets or sets the Author last name
        /// </summary>
        [XmlAttribute]
        public string AuthorLastName { get; set; }

        /// <summary>
        /// Save the comment to the database
        /// </summary>
        public bool Save()
        {
            throw new NotImplementedException("Not implemented"); // TODO
        }
    }
}
